<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>map</title>
    <script>
        let arr = [-15, 26, -33, 6];

        let newArr = arr.map(ele => {
            if (ele < 0) {
                return Math.abs(ele);
            } else {
                return ele;
            }
        })

        console.log(arr);

        console.log(newArr)


    </script>
</head>
<body>

</body>
</html>